/*
 * ThreadDriveSequence.cpp
 *
 *  Created on: Jan 30, 2013
 *      Author: Drew Prevost
 */

#include "ThreadDriveSequence.h"

ThreadDriveSequence::ThreadDriveSequence(
                                          int nIrqNum,
                                          int nPin,
                                          int nMode,
                                          int nMotorPin,
                                          int nSpeedMotorLow,
                                          int nSpeedMototHigh,
                                          int nAccPerSecondLow,
                                          int nAccPerSecondHigh,
                                          int nCluthPin,
                                          int nDegClutchDown,
                                          int nDegClutchUp,
                                          int nRateClutchDown,
                                          int nRateClutchUp,
                                          int nLoadWheelMinRpm,
                                          int nSecondsIdle,
                                          int nSecondsFullThrottle )
{
  this->nMotorPin = nMotorPin;
  this->nSpeedMotorLow = nSpeedMotorLow;
  this->nSpeedMototHigh = nSpeedMototHigh;
  this->nAccPerSecondLow = nAccPerSecondLow;
  this->nAccPerSecondHigh = nAccPerSecondHigh;
  this->nCluthPin = nCluthPin;
  this->nDegClutchDown = nDegClutchDown;
  this->nDegClutchUp = nDegClutchUp;
  this->nRateClutchDown = nRateClutchDown;
  this->nRateClutchUp = nRateClutchUp;
  this->nLoadWheelMinRpm = nLoadWheelMinRpm;
  this->nSecondsIdle = nSecondsIdle;
  this->nSecondsFullThrottle = nSecondsFullThrottle;
  tachometer.init( nIrqNum, nPin, nMode );
}

ThreadDriveSequence::~ThreadDriveSequence()
{
}

bool ThreadDriveSequence::run()
{
  threadServoRate.run();
  threadMotorController.run();

  PT_BEGIN()
  ;

PT_END()
;
return false;
}
